(function($) {
	
	// fForm

	var fFormMethods = {
		init: function( ) { 
			
		},
		disable: function(elements) { 
			var selector = elements === 'all' ? 'input,textarea,button,select' : 
				(elements != null ? elements :
				'button,input[type="button"],input[type="image"],input[type="file"]');
			$(this).find('input,textarea,button,select').not('[disabled]').each(function() {
				$(this).addClass('f-form-disabled-by-script').attr('disabled','disabled');
			});
		},
		reEnable: function() {
			$(this).find('.f-form-disabled-by-script').each(function() {
				$(this).removeClass('f-form-disabled-by-script').removeAttr('disabled');
			});
		},
		enable: function() {
		}
	};
		
	$.fn.fForm = function(method) {
		if (fFormMethods[method]) {
			return fFormMethods[method].apply(this,Array.prototype.slice.call(arguments,1));
		} else if (typeof method === 'object' || ! method) {
			return fFormMethods.init.apply(this,arguments);
		} else {
			$.error( 'Method ' +  method + ' does not exist on jQuery.fForm' );
		}    
	};
	
})(jQuery);
